from fastapi import FastAPI, Request

from ai_img.imageedit import imageedit_app
from ai_news.ai_news_app import ai_news_app
from ai_img.test2img import text2img_app
from wx_service.wx_service_app import wx_service_app

app = FastAPI(
    title="Amengi",
    description="这是阿萌dify中台服务平台",
    version="v1.0 Beta"
)

app.include_router(ai_news_app, prefix="/ai_news", tags=["ai_news"])

app.include_router(wx_service_app, prefix="/wx_service", tags=["wx_service"])

app.include_router(text2img_app, prefix="/ai_img", tags=["ai_img"])

app.include_router(imageedit_app, prefix="/ai_img", tags=["ai_img"])


@app.get("/")
async def login(request: Request):
    return {"message": "Hello World"}


if __name__ == '__main__':
    import uvicorn

    uvicorn.run("main:app", reload=True, host="0.0.0.0", port=8001)
